Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve imports and deep-merging of variables of any complex types #13

Merged
merged 2 commits into from
Jan 6, 2021

Conversation

aknysh
Copy link
Member

@aknysh aknysh commented Jan 6, 2021

what

  • Improve imports and deep-merging of variables of any complex types
  • Use the latest variant2 features (recursive user-defined functions, list of file paths in config) for stack configuration module

why

  • Simplify code
  • Deep-merge any number of import files with any complex structures (maps/objects)
  • Deep-merge all variables in this order: global-scoped, component-type-scoped, and component-scoped
  • Deep-merge all backend attributes in this order: global-scoped, component-type-scoped, and component-scoped

references

test

 ✗ . example ⨠ atmos stack config eks -s ue2-dev --config-type=vars
"cluster_kubernetes_version": "1.18"
"environment": "ue2"
"namespace": "eg"
"region": "us-east-2"
"stage": "dev"
"test-map":
  "a": "a4"
  "atr":
    "atr1": "1-1"
    "atr2": "2-4"
    "atr3": 3
    "atr4": 4
    "atr5": 5
    "list":
    - "1c"
  "atr-2":
    "atr1": 1
    "atr2": 2
  "b": "b2"
  "c": "c1"
  "d": "d4"
  "e": "e4"
  "f": "f4"
  "g": "g1"
  "list":
  - 4
  - 5
  - 6
  "list2":
  - 1
  - 2
  - 3

@aknysh aknysh requested a review from osterman January 6, 2021 04:52
@aknysh aknysh self-assigned this Jan 6, 2021
@aknysh aknysh requested review from a team as code owners January 6, 2021 04:52
@aknysh aknysh requested a review from nitrocode January 6, 2021 04:52
@aknysh aknysh merged commit 1cbd3e3 into master Jan 6, 2021
@aknysh aknysh deleted the improve-imports branch January 6, 2021 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants